<template>
    <div class="test-component">
        <span>test-component</span>
        <p></p>
    </div>
</template>

<script type="text/ecmascript-6">
export default {
    beforeCreate() {
        console.log("beforeCreate 创建前状态");
    },
    created() {
        console.log("created 创建完毕状态");
    },
    beforeMount() {
        console.log("beforeMount 挂载前状态（已被初始化）");
    },
    mounted() {
        console.log("mounted 挂载结束状态");
    },
    beforeUpdate() {
        console.log("beforeUpdate 更新前状态");
    },
    updated() {
        console.log("updated 更新完成状态");
    },
    activated() {
        console.log("activated, for keep-alive, 组件被激活时调用");
    },
    deactivated() {
        console.log("deactivated, for keep-alive, 组件被移除时调用");
    },
    beforeDestory() {
        console.log("beforeDestroy 销毁前状态");
    },
    destoryed() {
        console.log("destroyed 销毁完成状态");
    }
};
</script>

<style lang="less" rel="stylesheet/less">
</style>
